Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 5a995c7304da1ccbb75a8031272d64f6fdea8411


Parents : c7c70a5
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-04T00:07:21-06:00

test(AboutPage, ConfirmDialog, MapPage): update tests for improved component behavior and UI consistency

Changes

3 files changed, 22 insertions(+), 9 deletions(-)


Diff

diff --git a/tests/frontend/AboutPage.test.js b/tests/frontend/AboutPage.test.js
index 1de71967..96315ab6 100644
--- a/tests/frontend/AboutPage.test.js
+++ b/tests/frontend/AboutPage.test.js
@@ -91,24 +91,28 @@ describe("AboutPage.vue", () => {
});
const wrapper = mountAboutPage();
+ wrapper.vm.showAdvanced = true;
await vi.runOnlyPendingTimers();
await wrapper.vm.$nextTick();
await wrapper.vm.$nextTick(); // Extra tick for multiple async calls
+ await wrapper.vm.$nextTick();
+ await wrapper.vm.$nextTick();
expect(axiosMock.get).toHaveBeenCalledWith("/api/v1/app/info");
expect(axiosMock.get).toHaveBeenCalledWith("/api/v1/config");
- expect(wrapper.text()).toContain("Reticulum MeshChatX");
+ expect(wrapper.text()).toContain("MeshChatX");
+ expect(wrapper.text()).toContain("Reticulum Network Stack");
expect(wrapper.text()).toContain("hash1");
expect(wrapper.text()).toContain("hash2");
// Check for Dependency Chain section
- expect(wrapper.text()).toContain("about.dependency_chain");
+ expect(wrapper.text()).toContain("Dependency Chain");
expect(wrapper.text()).toContain("Lightweight Extensible Message Format");
expect(wrapper.text()).toContain("Reticulum Network Stack");
// Check for dependencies
- expect(wrapper.text()).toContain("about.backend_dependencies");
+ expect(wrapper.text()).toContain("Backend Stack");
expect(wrapper.text()).toContain("aiohttp");
expect(wrapper.text()).toContain("3.8.1");
});
@@ -133,6 +137,7 @@ describe("AboutPage.vue", () => {
});
const wrapper = mountAboutPage();
+ wrapper.vm.showAdvanced = true;
await wrapper.vm.$nextTick();
await wrapper.vm.$nextTick();
await wrapper.vm.$nextTick();
@@ -140,7 +145,7 @@ describe("AboutPage.vue", () => {
expect(getMemoryUsageSpy).toHaveBeenCalled();
expect(wrapper.vm.electronMemoryUsage).not.toBeNull();
- expect(wrapper.text()).toContain("Electron Resources");
+ expect(wrapper.text()).toContain("Environment Information");
});
it("handles shutdown action", async () => {

diff --git a/tests/frontend/ConfirmDialog.test.js b/tests/frontend/ConfirmDialog.test.js
index 9a075a8c..cc56d3c3 100644
--- a/tests/frontend/ConfirmDialog.test.js
+++ b/tests/frontend/ConfirmDialog.test.js
@@ -95,12 +95,9 @@ describe("ConfirmDialog.vue", () => {
await wrapper.vm.$nextTick();
- const backdrop = wrapper.findAll(".fixed").find((el) => {
- const classes = el.classes();
- return classes.includes("inset-0") && !classes.includes("z-[200]");
- });
+ const backdrop = wrapper.find(".backdrop-blur-sm");
- if (backdrop && backdrop.exists()) {
+ if (backdrop.exists()) {
await backdrop.trigger("click");
await wrapper.vm.$nextTick();
expect(resolvePromise).toHaveBeenCalledWith(false);

diff --git a/tests/frontend/MapPage.test.js b/tests/frontend/MapPage.test.js
index 88101087..bcf6ac44 100644
--- a/tests/frontend/MapPage.test.js
+++ b/tests/frontend/MapPage.test.js
@@ -19,6 +19,12 @@ vi.mock("ol/Map", () => ({
on: vi.fn(),
addLayer: vi.fn(),
addInteraction: vi.fn(),
+ addOverlay: vi.fn(),
+ removeInteraction: vi.fn(),
+ removeOverlay: vi.fn(),
+ un: vi.fn(),
+ getEventPixel: vi.fn().mockReturnValue([0, 0]),
+ getTargetElement: vi.fn().mockReturnValue({ style: {} }),
getView: vi.fn().mockReturnValue({
on: vi.fn(),
setCenter: vi.fn(),
@@ -33,6 +39,9 @@ vi.mock("ol/Map", () => ({
push: vi.fn(),
getArray: vi.fn().mockReturnValue([]),
}),
+ getOverlays: vi.fn().mockReturnValue({
+ getArray: vi.fn().mockReturnValue([]),
+ }),
forEachFeatureAtPixel: vi.fn(),
setTarget: vi.fn(),
updateSize: vi.fn(),
@@ -129,10 +138,12 @@ describe("MapPage.vue", () => {
patch: vi.fn().mockResolvedValue({ data: {} }),
delete: vi.fn().mockResolvedValue({ data: {} }),
};
+ vi.stubGlobal("axios", axiosMock);
window.axios = axiosMock;
});
beforeEach(() => {
+ vi.stubGlobal("axios", axiosMock);
window.axios = axiosMock;
// Mock localStorage
const localStorageMock = {


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────